﻿<%@ Page Language="C#" Title="路网路况评定表" MasterPageFile="~/W_View/PageMaster.Master" CodeBehind="E_NetevaluPage.aspx.cs" Inherits="STHPMS1.Web.W_View.Evaluate.E_NetevaluPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <%= UiHelper.RefJsFileHtml("/Scripts/Control/datagrid.js")%>
    <%= UiHelper.RefJsFileHtml("/Scripts/Control/dropdown.js")%>

    <script type="text/javascript">
        function search(n, o) {
            var url = '/api/netevalu';
            $('#dg').datagrid({ url: url, pageNumber: 1 });
        }

        $(function () {
            var number = '<%= Page.RouteData.Values["page"] %>';
            var size = '<%= Page.RouteData.Values["size"] %>';

            loadAdmDiv();
            dataGridBind($('#dg'), '', '公路技术状况评定（按路网）', $('#tb'), number, size);

            $('.validatebox-text').bind('blur', function () {
                $(this).validatebox('enableValidation').validatebox('validate');
            });
        })


        function Insert() {
            var inspecid = $('#cmbInspecid').combobox("getValue"); //评定名称
            var roadnetname = $('#cmbRoadnetName').combobox("getText"); //路网名称
            if (!inspecid) {
                $.messager.alert('消息提示', '请选择评定名称和路网！', 'warning');
                return;
            }

            $.ajax({

                url: "/api/netevalu/GetSaveNetEvalu?inspecid=" + inspecid + "&roadnetname=" + roadnetname + "",
                success: function () {
                    $.messager.alert('成功', '路网评定成功!', "info");
                    $('#dg').datagrid({ url: '/api/netevalu', pageNumber: 1 });
                },
                error: function (err) {
                    $.messager.alert('错误提示', '删除数据失败 -' + err, "error");
                }
            });

        }

    </script>    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table id="dg" class="easyui-datagrid content-place"  ajaxCached="false"  >
        <thead>
            <tr>
                <th rowspan="2" data-options="field:'RoadnetName',editor:'text',width:100,align:'right' ">路网名称</th>
                <th rowspan="2" data-options="field:'Evalyear',editor:'text',width:80,align:'right' ">评定时间</th>
                <th rowspan="2" data-options="field:'Evalu_Length',editor:'text',width:80,align:'right' " >评定长度/KM </th>
                <th rowspan="2" data-options="field:'Netmqi',editor:'numberbox',width:80,align:'right' " formatter="formatNumber">路网平均MQI</th>
                
                <th colspan="3">路网MQI比例/%</th>
                <th colspan="3">路网PQI比例/%</th>
                <th colspan="3">路网SCI比例/%</th>
                <th colspan="3">路网TCI比例/%</th>
                <th colspan="3">路网BCI比例/%</th>

                <th colspan="3">MQI路线长度/KM</th>
                <th colspan="3">PQI路线长度/KM</th>
                <th colspan="3">SCI路线长度/KM</th>
                <th colspan="3">TCI路线长度/KM</th>
                <th colspan="3">BCI路线长度/KM</th>

            </tr>

            <tr>
                <th data-options="field:'Netgdrdrate_Mqi',editor:'text',width:40,align:'right' " formatter="formatNumber">优良</th>
                <th data-options="field:'Netmdrdrate_Mqi',editor:'text',width:40,align:'right' " formatter="formatNumber">中等</th>
                <th data-options="field:'Netbardrate_Mqi',editor:'text',width:40,align:'right' " formatter="formatNumber">次差</th>

                <th data-options="field:'Netgdrdrate_Pqi',editor:'text',width:40,align:'right' " formatter="formatNumber">优良</th>
                <th data-options="field:'Netmdrdrate_Pqi',editor:'text',width:40,align:'right' " formatter="formatNumber">中等</th>
                <th data-options="field:'Netbardrate_Pqi',editor:'text',width:40,align:'right' " formatter="formatNumber">次差</th>

                <th data-options="field:'Netgdrdrate_Sci',editor:'text',width:40,align:'right' " formatter="formatNumber">优良</th>
                <th data-options="field:'Netmdrdrate_Sci',editor:'text',width:40,align:'right' " formatter="formatNumber">中等</th>
                <th data-options="field:'Netbardrate_Sci',editor:'text',width:40,align:'right' " formatter="formatNumber">次差</th>
                                                                              
                <th data-options="field:'Netgdrdrate_Tci',editor:'text',width:40,align:'right' " formatter="formatNumber">优良</th>
                <th data-options="field:'Netmdrdrate_Tci',editor:'text',width:40,align:'right' " formatter="formatNumber">中等</th>
                <th data-options="field:'Netbardrate_Tci',editor:'text',width:40,align:'right' " formatter="formatNumber">次差</th>
                                                                              
                <th data-options="field:'Netgdrdrate_Bci',editor:'text',width:40,align:'right' " formatter="formatNumber">优良</th>
                <th data-options="field:'Netmdrdrate_Bci',editor:'text',width:40,align:'right' " formatter="formatNumber">中等</th>
                <th data-options="field:'Netbardrate_Bci',editor:'text',width:40,align:'right' " formatter="formatNumber">次差</th>
                                                                              
                <th data-options="field:'Netgdlength_Mqi',editor:'text',width:40,align:'right' " formatter="formatNumber">优良</th>
                <th data-options="field:'Netmdlength_Mqi',editor:'text',width:40,align:'right' " formatter="formatNumber">中等</th>
                <th data-options="field:'Netbdlength_Mqi',editor:'text',width:40,align:'right' " formatter="formatNumber">次差</th>
                                                                              
                <th data-options="field:'Netgdlength_Pqi',editor:'text',width:40,align:'right' " formatter="formatNumber">优良</th>
                <th data-options="field:'Netmdlength_Pqi',editor:'text',width:40,align:'right' " formatter="formatNumber">中等</th>
                <th data-options="field:'Netbdlength_Pqi',editor:'text',width:40,align:'right' " formatter="formatNumber">次差</th>
                                                                                           
                <th data-options="field:'Netgdlength_Sci',editor:'text',width:40,align:'right' " formatter="formatNumber">优良</th>
                <th data-options="field:'Netmdlength_Sci',editor:'text',width:40,align:'right' " formatter="formatNumber">中等</th>
                <th data-options="field:'Netbdlength_Sci',editor:'text',width:40,align:'right' " formatter="formatNumber">次差</th>
                                                                                           
                <th data-options="field:'Netgdlength_Tci',editor:'text',width:40,align:'right' " formatter="formatNumber">优良</th>
                <th data-options="field:'Netmdlength_Tci',editor:'text',width:40,align:'right' " formatter="formatNumber">中等</th>
                <th data-options="field:'Netbdlength_Tci',editor:'text',width:40,align:'right' " formatter="formatNumber">次差</th>
                                                                                           
                <th data-options="field:'Netgdlength_Bci',editor:'text',width:40,align:'right' " formatter="formatNumber">优良</th>
                <th data-options="field:'Netmdlength_Bci',editor:'text',width:40,align:'right' " formatter="formatNumber">中等</th>
                <th data-options="field:'Netbdlength_Bci',editor:'text',width:40,align:'right' " formatter="formatNumber">次差</th>
            </tr>
            

        </thead>
    </table>
   
    <!--测试数据命令-->
    <div id="tb">
      
        <%-- <select id="cmbRoads" class="easyui-combobox" panelHeight="80" style="width:100px" data-options="prompt:'路线编号',url:'/api/roadway/dict',method:'get',valueField:'id',textField:'id'">
         </select>--%>


          <select id="cmbInspecid" class="easyui-combobox" panelHeight="80" style="width:150px" data-options="prompt:'评定名称',url:'/api/roadwaydetail/getinspecid',method:'get',valueField:'id',textField:'id'">
         </select>
         <select id="cmbRoadnetName" class="easyui-combobox" panelHeight="80" style="width:150px" data-options="prompt:'路网名称',url:'/api/roadnet/getroadnet',method:'get',valueField:'id',textField:'text'">
         </select>

        <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="Insert();">路网评定</a>
    </div>

   
</asp:Content>
